<%@page contentType="text/html" pageEncoding="UTF-8" %>
<!DOCTYPE html>
<html lang="zh">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>个人信息管理系统 - 文件上传</title>
    <style>
        body {
            font-family: Arial, sans-serif;
            background-color: #f4f7fc;
            margin: 0;
            padding: 0;
        }

        .container {
            width: 100%;
            max-width: 800px; /* 限制最大宽度为800px */
            margin: 0 auto;
            padding: 30px;
        }

        header {
            text-align: center;
            background-color: #4CAF50;
            color: white;
            padding: 10px 0;
            font-size: 24px;
            font-weight: bold;
        }

        table {
            width: 100%;
            margin-top: 30px;
            background-color: white;
            border-radius: 8px;
            box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
            overflow: hidden;
        }

        a {
            text-decoration: none; /* 去掉下划线 */
        }

        td {
            padding: 15px;
            text-align: left;
            font-size: 16px;
        }

        td input[type="file"], td input[type="text"] {
            width: 100%; /* 让输入框宽度占满表格的列 */
            max-width: 400px; /* 限制输入框最大宽度 */
            padding: 8px;
            font-size: 16px;
            border-radius: 5px;
            border: 1px solid #ddd;
            margin: 0 auto; /* 居中显示 */
            display: block; /* 保证输入框在其容器中居中 */
        }

        td .button-container {
            display: flex; /* 使用flexbox */
            justify-content: center; /* 水平居中按钮 */
            gap: 20px; /* 按钮之间的间距 */
        }

        td input[type="submit"], td input[type="reset"] {
            background-color: #4CAF50;
            color: white;
            border: none;
            padding: 12px 30px;
            font-size: 16px;
            border-radius: 5px;
            cursor: pointer;
            transition: background-color 0.3s ease;
        }

        td input[type="submit"]:hover, td input[type="reset"]:hover {
            background-color: #45a049;
        }

        .link {
            text-decoration: none;
            color: #4CAF50;
            font-size: 16px;
        }

        .link:hover {
            text-decoration: underline;
        }

        footer {
            text-align: center;
            font-size: 14px;
            color: #888;
            margin-top: 30px;
        }
    </style>
</head>
<body>

<div class="container">
    <header>文件上传</header>

    <div align="center">
        <table border="0" cellspacing="0" cellpadding="0" width="100%">
            <tr>
                <td width="50%" align="center">
                    <span>上传文件(最大不超过100MB)</span>
                </td>
                <td width="50%" align="center">
                    <a href="http://localhost/fileManager/fileDown.jsp" class="link">文件列表</a>
                </td>
            </tr>
        </table>
    </div>

    <form action="http://localhost/FileUpController/fileUp" enctype="multipart/form-data" method="post">
        <table>
            <tr>
                <td align="right">上传文件</td>
                <td><input type="file" name="file" size="30"></td>
            </tr>
            <tr>
                <td align="right">文件标题</td>
                <td><input type="text" name="title" size="30"></td>
            </tr>
            <tr>
                <td colspan="2" align="center">
                    <div class="button-container">
                        <input type="submit" value="上传">
                        <input type="reset" value="重置">
                    </div>
                </td>
            </tr>
        </table>
    </form>

    <footer>
        <p>&copy; 2024 个人信息管理系统. 版权所有.</p>
    </footer>
</div>

</body>
</html>
